import request from '@/config/axios'
import type { Dayjs } from 'dayjs';

/** 网关等级信息 */
export interface GatewayLevel {
          id: number; // 主键
          gatewayName: string; // 网关全名
          gatewayShortName?: string; // 网关简称
          listLevel: string; // 名单等级：1差 2中级 3优质
  }

// 网关等级 API
export const GatewayLevelApi = {
  // 查询网关等级分页
  getGatewayLevelPage: async (params: any) => {
    return await request.get({ url: `/vos/gateway-level/page`, params })
  },

  // 查询网关等级详情
  getGatewayLevel: async (id: number) => {
    return await request.get({ url: `/vos/gateway-level/get?id=` + id })
  },

  // 新增网关等级
  createGatewayLevel: async (data: GatewayLevel) => {
    return await request.post({ url: `/vos/gateway-level/create`, data })
  },

  // 修改网关等级
  updateGatewayLevel: async (data: GatewayLevel) => {
    return await request.put({ url: `/vos/gateway-level/update`, data })
  },

  // 删除网关等级
  deleteGatewayLevel: async (id: number) => {
    return await request.delete({ url: `/vos/gateway-level/delete?id=` + id })
  },

  /** 批量删除网关等级 */
  deleteGatewayLevelList: async (ids: number[]) => {
    return await request.delete({ url: `/vos/gateway-level/delete-list?ids=${ids.join(',')}` })
  },

  // 导出网关等级 Excel
  exportGatewayLevel: async (params) => {
    return await request.download({ url: `/vos/gateway-level/export-excel`, params })
  },
}